from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def helloworld(request):
    return HttpResponse('hello world?????')

def list(request):
    author = 'andy'
    article_number = 20
    article_list = [
        '第一篇文章: 什么是django',
        '第二篇文章: django的mvt模式',
        '第三片文章: django的视图'
    ]
    info = {
        'name': 'andy',
        'age': 30,
        'programming_language': ['python','java','c']
    }
    
    return render(request,'list.html', {
        'author': author,
        'number': article_number,
        'article_list': article_list,
        'info': info,
    })
